<?php

/**
 * #Celebrate Shieh
 *             ,%%%%%%%%,
 *           ,%%/\%%%%/\%%
 *          ,%%%\c "" J/%%%
 * %.       %%%%/ o  o \%%%
 * `%%.     %%%%    _  |%%%
 *  `%%     `%%%%(__Y__)%%'
 *  //       ;%%%%`\-/%%%'
 * ((       /  `%%%%%%%'
 *  \\    .'          |
 *   \\  /       \  | |
 *    \\/         ) | |
 *     \         /_ | |__
 *     (___________))))))) 攻城湿
 *
 *        _       _
 * __   _(_)_   _(_) __ _ _ __
 * \ \ / / \ \ / / |/ _` |'_ \
 *  \ V /| |\ V /| | (_| | | | |
 *   \_/ |_| \_/ |_|\__,_|_| |_|
 */

namespace App\Modules\Blog\Http\Controllers;


use Illuminate\Http\Request;

class HomeController extends Controller
{

    /**
     * @param Request $request
     *发送邮件验证码
     *
     * @return \Illuminate\Http\JsonResponse
     */
    public function code( Request $request )
    {
        return $this->getCommon()->CodeEmailCommonService($request);
    }

    /**
     * 获取公共数据
     *
     * @param Request $request
     *
     * @return \Illuminate\Http\JsonResponse
     */
    public function publicData( Request $request )
    {
        return $this->getCommon()->PublicDataCommonService($request);
    }

    /**
     * 上传文件
     *
     * @param Request $request
     *
     * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
     */
    public function upload( Request $request )
    {
        return $this->getUpload()->PicStoreService($request);
    }
}
